<?php
// require("../codebase/connector/treemultitable_connector.php");

$result = mysql_connect("localhost","gsdbadmin","atdt911");
mysql_select_db("gsdata");

// $treeConn = new TreeMultitableConnector($res,"MySQL");
// $treeConn->setMaxLevel(5);
// $level = $treeCon->get_level();

$iconArea = "map.png";
$iconRoom = "door_in.png";
$iconDoor = "door.png";
$iconNPC = "user_business.png";
$iconItem = "plugin.png";
$iconWpn = "pistol.png";
$iconVehicle = "car2.png";
$iconGadget = "pda.png";
$iconArmor = "t-shirt-gray.png";
$iconConsumable = "flask.png";
$iconPharma = "pill.png";
$iconKit = "briefcase.png";
$iconElectronics = "ddr_memory.png";
$iconComputer = "computer.png";
$iconCraft = "cog.png";
$iconAmmo ="";

header("Content-type:text/xml");
print('<?xml version="1.0" encoding="iso-8859-1" ?>');
echo "<div class=\"dhtmlxTree\"><xmp>";
echo "<tree id=\"0\">";
echo "    <item id=\"area\" text=\"Areas\" select=\"1\" im0=\"$iconArea\" im1=\"$iconArea\" im2=\"$iconArea\">";

echo "    </item>";
echo "    <item id=\"room\" text=\"Rooms\" select=\"0\" im0=\"$iconRoom\" im1=\"$iconRoom\" im2=\"$iconRoom\">";

echo "    </item>";
echo "    <item id=\"door\" text=\"Doors\" select=\"0\" im0=\"$iconDoor\" im1=\"$iconDoor\" im2=\"$iconDoor\">";

echo "    </item>";
echo "    <item id=\"npc\" text=\"NPC\" select=\"0\" im0=\"$iconNPC\" im1=\"$iconNPC\" im2=\"$iconNPC\">";

echo "    </item>";

echo "    <item id=\"item\" text=\"Items\" child=\"1\" select=\"0\" im0=\"$iconItem\" im1=\"$iconItem\" im2=\"$iconItem\">";

 echo "    <item id=\"kit\" text=\"Kits\" select=\"0\" im0=\"$iconKit\" im1=\"$iconKit\" im2=\"$iconKit\">";

 echo "    </item>";
  echo "    <item id=\"gadget\" text=\"Gadgets\" select=\"0\" im0=\"$iconGadget\" im1=\"$iconGadget\" im2=\"$iconGadget\">";

 echo "    </item>";
 echo "    <item id=\"trap\" text=\"Traps\" select=\"0\" im0=\"trap.png\" im1=\"trap.png\" im2=\"trap.png\">";
 
 echo "    </item>";
 
 echo "    <item id=\"armor\" text=\"Armor\" select=\"0\" im0=\"$iconArmor\" im1=\"$iconArmor\" im2=\"$iconArmor\">";

 echo "    </item>";
 echo "    <item id=\"consumables\" text=\"Consumables\" select=\"0\" im0=\"$iconConsumable\" im1=\"$iconConsumable\" im2=\"$iconConsumable\">";

 echo "    </item>";
echo "    <item id=\"pharma\" text=\"Pharmaceuticals\" select=\"0\" im0=\"$iconPharma\" im1=\"$iconPharma\" im2=\"$iconPharma\">";

echo "    </item>";
echo "    <item id=\"electronics\" text=\"Electronics\" select=\"0\" im0=\"$iconElectronics\" im1=\"$iconElectronics\" im2=\"$iconElectronics\">";

echo "    </item>";
echo "    <item id=\"computer\" text=\"Computer HW/SW\" select=\"0\" im0=\"$iconComputer\" im1=\"$iconComputer\" im2=\"$iconComputer\">";

echo "    </item>";
echo "    <item id=\"craftable\" text=\"Craftable\" select=\"0\" im0=\"$iconCraft\" im1=\"$iconCraft\" im2=\"$iconCraft\">";

echo "    </item>";
echo "    <item id=\"ammo\" text=\"Ammunition\" select=\"0\" im0=\"$iconAmmo\" im1=\"$iconAmmo\" im2=\"$iconAmmo\">";

echo "    </item>";

echo "    </item>";



echo "    <item id=\"wpn\" text=\"Weapons\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";
echo "    <item id=\"melee\" text=\"Melee\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";
echo "    <item id=\"axe\" text=\"Axes\" select=\"0\" im0=\"axe003.png\" im1=\"axe003.png\" im2=\"axe003.png\">";
echo "    </item>";
echo "    <item id=\"spear\" text=\"Spears\" select=\"0\" im0=\"W_Spear003.png\" im1=\"W_Spear003.png\" im2=\"W_Spear003.png\">";
echo "    </item>";
echo "    <item id=\"improvised\" text=\"Improvised\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";
echo "    </item>";
echo "    <item id=\"mace\" text=\"Maces\" select=\"0\" im0=\"W_Mace004.png\" im1=\"W_Mace004.png\" im2=\"W_Mace004.png\">";
echo "    </item>";
echo "    <item id=\"sword\" text=\"Swords\" select=\"0\" im0=\"W_Sword001.png\" im1=\"W_Sword001.png\" im2=\"W_Sword001.png\">";
echo "    </item>";
echo "    <item id=\"club\" text=\"Clubs\" select=\"0\" im0=\"club.png\" im1=\"club.png\" im2=\"club.png\">";
echo "    </item>";
echo "    <item id=\"exotic_melee\" text=\"Exotic Melee\" select=\"0\" im0=\"exotic.png\" im1=\"exotic.png\" im2=\"exotic.png\">";
echo "    </item>";

echo "    </item>";


echo "    <item id=\"ranged\" text=\"Ranged\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";

echo "    <item id=\"handgun\" text=\"Handguns\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";
echo "    </item>";
echo "    <item id=\"assault_rifle\" text=\"Assault Rifles\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";
echo "    </item>";
echo "    <item id=\"bolt_rifle\" text=\"Bolt-action Rifles\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";
echo "    </item>";
echo "    <item id=\"shotgun\" text=\"Shotguns\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";
echo "    </item>";
echo "    <item id=\"submachinegun\" text=\"Submachinegun\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";
echo "    </item>";
echo "    <item id=\"machinegun\" text=\"Machine Gun\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";
echo "    </item>";
echo "    <item id=\"explosives\" text=\"Explosives\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";
echo "    </item>";
echo "    <item id=\"hurled\" text=\"Hurled\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";
echo "    </item>";
echo "    <item id=\"exotic_ranged\" text=\"Exotic Ranged\" select=\"0\" im0=\"$iconWpn\" im1=\"$iconWpn\" im2=\"$iconWpn\">";
echo "    </item>";

echo "    </item>";

 
echo "    </item>";
 
echo "    <item id=\"vehicle\" text=\"Vehicles\" select=\"0\" im0=\"$iconVehicle\" im1=\"$iconVehicle\" im2=\"$iconVehicle\">";

echo "    </item>";


echo "</tree>";
echo "</xmp></div>";
?>